package com.afu.aopDemo.entity;

import lombok.Data;

import java.util.Objects;

/**
 * ClassName: Student
 * Package: com.afu.aopDemo.entity
 * Description:
 *
 * @Author zxf
 */
@Data
public class Student {
    private String name;
    private Integer age;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Student student = (Student) o;
        return Objects.equals(name, student.name) && Objects.equals(age, student.age);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, age);
    }
}
